/**
 * Created by njz on 2017/9/25.
 */
import {
    modules
} from './data'
import store from '../store'
import {types} from '../store/module/viewKanban'
import request from '../request'
import config from '../../config'
import {Kanban} from '../model/Kanban'


export default {
    /**
     * 获取当前用户的所用看板
     * @returns {*}
     */
    getMyKanban: function () {
        return request.get(`${config.apiRoot}v1/my/project`)
    },

    /**
     * 获取默认看板
     * @returns {*}
     */
    getMyDefaultKanban: function () {
        return request.get(`${config.apiRoot}v1/my/project`)
            .then(data=>{
                return new Kanban(data.filter(item=>item.is_default == 1)[0])
            })

    },

}
